package com.bw.module_service.adapter

import android.graphics.Color
import androidx.cardview.widget.CardView
import com.bw.lib_common.entity.MenuEntity
import com.bw.module_service.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class ServiceMenuAdapter : BaseQuickAdapter<MenuEntity, BaseViewHolder>(
    R.layout.service_menu_item
) {
    override fun convert(holder: BaseViewHolder, item: MenuEntity) {
        val cardView = holder.getView<CardView>(R.id.service_item_card)
        cardView.radius = 15f
        cardView.setCardBackgroundColor(Color.WHITE)
        holder.setText(R.id.service_menu_title,item.title)
        holder.setImageResource(R.id.service_menu_image,item.image)
    }
}